package com.suep.business.service.impl;
import com.suep.business.domain.UserAddress;
import com.suep.business.mapper.UserAddressMapper;
import com.suep.business.service.IUserAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserAddressServiceImpl implements IUserAddressService {

    @Autowired
    private UserAddressMapper userAddressMapper;

    @Override
    public Integer insertUserAddress(UserAddress userAddress) {
        return userAddressMapper.insertUserAddress(userAddress);
    }

    @Override
    public UserAddress selectUserAddressById(Integer addressId) {
        return userAddressMapper.selectUserAddressById(addressId);
    }

    @Override
    public List<UserAddress> selectUserAddressByUserId(Integer userId) {
        return userAddressMapper.selectUserAddressByUserId(userId);
    }

    @Override
    public Integer updateUserAddress(UserAddress userAddress) {
        return userAddressMapper.updateUserAddressById(userAddress);
    }

    @Override
    public Integer deleteUserAddressById(Integer addressId) {
        return userAddressMapper.deleteUserAddressById(addressId);
    }
}